//
// Sequential Linked Queue
// Created by Win10 on 2022/10/30.
//

#ifndef C_DATA_STRUCTURE_SQL_QUEUE_H
#define C_DATA_STRUCTURE_SQL_QUEUE_H

typedef int ElemType;

typedef struct LinkNode {
    ElemType data;
    struct LinkNode *next;
} LinkNode;

typedef struct {
    LinkNode *front, *rear;
} LinkQueue;

void InitQueue(LinkQueue &Q);

bool QueueEmpty(LinkQueue Q);

bool EnQueue(LinkQueue &Q, ElemType x);

bool DeQueue(LinkQueue &Q, ElemType &x);

bool GetHead(LinkQueue Q, ElemType &x);

#endif //C_DATA_STRUCTURE_SQL_QUEUE_H
